/************************************************************************/
/*																		*/
/*		School Hangover Project											*/
/*																		*/
/*		IMAC 2010														*/
/*		Author : 	Helena Duchaussoy									*/
/*					Isabelle Gouwy										*/
/*					Nathalie Kuoch										*/
/*					Franck Letellier									*/
/*					Louise Pequignot									*/
/*																		*/
/*		E-mail: flo-in-underware@googlegroups.com						*/
/*																		*/
/************************************************************************/

#ifndef __ABSTRACTSTAGE_H__
#define __ABSTRACTSTAGE_H__

#include <iostream>
#include <osg/Group>
#include <osg/Geode>
#include <osg/Vec3>
#include "Hud.h"

class Player;

class AbstractStage{

protected:

	std::string m_snextStage;
	std::string m_sname;

	//Scene graph
	osg::Group*		m_proot;

	// Player
	Player*			m_pplayer;

	// Hud
	Hud*			m_phud;
public:

	virtual void init() = 0;
	virtual void update() = 0;

	virtual inline const std::string& getName(){return m_sname;}
	virtual inline const std::string& getNextName(){return m_snextStage;}

	virtual inline osg::Group* getRootNode() {return m_proot;}

	virtual inline Player* getPlayer() { return m_pplayer; }

	virtual inline Hud* getHud() { return m_phud; }
	
	virtual bool computeCollision(Player* player){return false;}
	virtual bool computeInteraction(Player* player){return false;}

	///brief Know if we are going to the next level
	virtual bool isFinished() =0;
	virtual const osg::Vec3d& getPlayerPos() =0;

};

#endif //__ABSTRACTSTAGE_H__